package webTest.myTag.SimpleTag;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.SimpleTagSupport;
import java.io.IOException;
import java.io.StringWriter;

/**
 * Created by IFT8 on 2015/3/18.
 */
public class ChangeTag extends SimpleTagSupport{
    @Override
    public void doTag() throws JspException, IOException {
        StringWriter stringWriter=new StringWriter();
        //标签体内容写到定义的流中
        getJspBody().invoke(stringWriter);
        String content= stringWriter.toString();
        content=content.toUpperCase();
        getJspContext().getOut().print(content);
    }
}
